<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/DB/tpT/public/static/layui/dist/css/layui.css"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">搜索</label>
        <div class="layui-input-inline">
            <input type="text" name="keywords" required lay-verify="required" placeholder="请输入海贼名字"
                   autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-mid layui-word-aux">
            <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
        </div>
    </div>
</form>
<ul class="layui-nav">
    <li class="layui-nav-item"><a href="">首页</a></li>
    <li class="layui-nav-item layui-this">
        <a href="javascript:;">海贼百科</a>
        <dl class="layui-nav-child">
            <dd><a href="">海贼人物</a></dd>
            <dd><a href="">海贼团</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item"><a href="">后台管理</a></li>
</ul>
<div class="layui-row">
    <div class="layui-col-xs4 layui-col-sm7 layui-col-md8">
        <div class="grid-demo">
            <div style="width: 100%; height: auto; min-height: 100px;">
                {volist name="character" id="vo"}
                    <div class="layui-col-md3">
                        <img src="{$vo.ch_img}" width="100%" /><br/>
                        {$vo.ch_name}
                    </div>
                {/volist}
                {volist name="group" id="vo2"}
                    <div class="layui-col-md3">
                        <img src="{$vo2.gr_img}" width="100%" />
                        {$vo2.gr_group}
                    </div>
                {/volist}
                    <div class="layui-col-md3">

                    </div>
            </div>
        </div>
    </div>
    <div class="layui-col-xs4 layui-col-sm5 layui-col-md4">
        <div class="grid-demo">
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>名字</th>
                    <th>悬赏金额</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>路飞</td>
                    <td>12贝利</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script src="/DB/tpT/public/static/layui/dist/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>